import React from "react";
import { createBrowserRouter, redirect } from "react-router-dom";
import AuthRoot from "@/pages/home/AuthRoot";

//路由配置

export default createBrowserRouter([
  {
    path:'/login',
    lazy:() => import('@/pages/login/login.tsx')
  },
  {
    path:'/',
    element: <AuthRoot/>,
    children:[
      {
        path: '*',
        action:() => {
          return redirect('/home')
        }
      }
    ]
  }
])
